#!/bin/sh
# Usage:
# Takes the name of a language pack to install. Only handles the following language packs:
#	langelgr.xpi 
#	langengb.xpi
#	langfrfr.xpi
#	langheil.xpi
#	langitit.xpi 
#	langjajp.xpi 
#	langkokr.xpi
#	langmsmy.xpi gone in v1.4.1
#	langplpl.xpi 
#	langukua.xpi 
#	langzhcn.xpi 
#	langzhtw.xpi
# 	langdadk.xpi
# 	langdeat.xpi 
# 	langetee.xpi 
# new languages with v1.4.1
#	langarsa.xpi
#	langastes.xpi
#	langbeby.xpi
#	langbgbg.xpi
#	langbrfr.xpi
#	langcaes.xpi
#	langcscz.xpi
#	langcygb.xpi
#	langeoeo.xpi
#	langeses.xpi
#	langeues.xpi
#	langfifi.xpi
#	langgles.xpi
#	langhuhu.xpi
#	langnbno.xpi
#	langnlnl.xpi
#	langnnno.xpi
#	langroro.xpi
#	langsksk.xpi
#	langslsi.xpi
#	langtamy.xpi
#	langtrtr.xpi
#	langwende.xpi

moz_home=$rbase/var/netscape/mozilla
moz_libs=$rbase/usr/lib32/internal/mozilla
installed_chrome=$moz_home/chrome/installed-chrome.txt
locale_res="locale,install,url,jar:resource:/chrome"
tmp=$rbase/tmp/`basename $0`.$$

function install_langfrfr {
	echo "$locale_res/FR.jar!/locale/FR/communicator-region/" >> $installed_chrome
	echo "$locale_res/FR.jar!/locale/FR/editor-region/" >> $installed_chrome
	echo "$locale_res/FR.jar!/locale/FR/global-region/" >> $installed_chrome
	echo "$locale_res/FR.jar!/locale/FR/messenger-region/" >> $installed_chrome
	echo "$locale_res/FR.jar!/locale/FR/navigator-region/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/autoconfig/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/chatzilla/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/communicator/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/content-packs/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/cookie/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/editor/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/embed/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/forms/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/global/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/help/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/inspector/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/messenger/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/messenger-smime/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/mozldap/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/navigator/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/necko/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/p3p/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/pipnss/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/pippki/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/venkman/" >> $installed_chrome
	echo "$locale_res/fr-FR.jar!/locale/fr-FR/wallet/" >> $installed_chrome
	echo "$locale_res/fr-unix.jar!/locale/fr-FR/communicator-platform/" >> $installed_chrome
	echo "$locale_res/fr-unix.jar!/locale/fr-FR/global-platform/" >> $installed_chrome
	echo "$locale_res/fr-unix.jar!/locale/fr-FR/navigator-platform/" >> $installed_chrome
}

function remove_langfrfr {
	grep -v '/fr-FR/' $installed_chrome | grep -v 'FR.jar' | grep -v 'fr-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langdadk {
	echo "$locale_res/da-DK.jar!/locale/da-DK/autoconfig/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/chatzilla/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/communicator/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/content-packs/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/cookie/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/editor/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/global/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/help/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/inspector/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/messenger/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/messenger-smime/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/mozldap/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/navigator/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/necko/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/p3p/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/pipnss/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/pippki/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/venkman/" >> $installed_chrome
	echo "$locale_res/da-DK.jar!/locale/da-DK/wallet/" >> $installed_chrome
	echo "$locale_res/da-unix.jar!/locale/da-DK/communicator-platform/" >> $installed_chrome
	echo "$locale_res/da-unix.jar!/locale/da-DK/global-platform/" >> $installed_chrome
	echo "$locale_res/da-unix.jar!/locale/da-DK/navigator-platform/" >> $installed_chrome
}

function remove_langdadk {
	grep -v '/da-DK/' $installed_chrome  | grep -v 'da-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langdeat {
	echo "$locale_res/de-AT.jar!/locale/de-AT/help/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/forms/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/necko/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/communicator/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/navigator/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/autoconfig/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/chatzilla/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/cookie/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/editor/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/global/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/mozldap/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/messenger-smime/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/pipnss/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/pippki/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/wallet/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/messenger/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/content-packs/" >> $installed_chrome
	echo "$locale_res/de-AT.jar!/locale/de-AT/inspector/" >> $installed_chrome
	echo "$locale_res/de-unix.jar!/locale/de-AT/navigator-platform/" >> $installed_chrome
	echo "$locale_res/de-unix.jar!/locale/de-AT/global-platform/" >> $installed_chrome
	echo "$locale_res/de-unix.jar!/locale/de-AT/communicator-platform/" >> $installed_chrome
	echo "$locale_res/AT.jar!/locale/AT/navigator-region/" >> $installed_chrome
	echo "$locale_res/AT.jar!/locale/AT/editor-region/" >> $installed_chrome
	echo "$locale_res/AT.jar!/locale/AT/messenger-region/" >> $installed_chrome
	echo "$locale_res/AT.jar!/locale/AT/communicator-region/" >> $installed_chrome
	echo "$locale_res/AT.jar!/locale/AT/global-region/" >> $installed_chrome
}

function remove_langdeat {
	grep -v '/de-AT/' $installed_chrome | grep -v 'AT.jar' | grep -v 'de-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langetee {
	echo "$locale_res/et-EE.jar!/locale/et-EE/autoconfig/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/communicator/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/content-packs/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/cookie/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/editor/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/global/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/help/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/messenger/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/messenger-smime/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/mozldap/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/navigator/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/necko/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/p3p/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/pipnss/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/pippki/" >> $installed_chrome
	echo "$locale_res/et-EE.jar!/locale/et-EE/wallet/" >> $installed_chrome
}

function remove_langetee {
	grep -v '/et-EE/' $installed_chrome  > $tmp
	mv $tmp $installed_chrome
}

function install_langitit {
	echo "$locale_res/IT.jar!/locale/IT/communicator-region/" >> $installed_chrome
	echo "$locale_res/IT.jar!/locale/IT/editor-region/" >> $installed_chrome
	echo "$locale_res/IT.jar!/locale/IT/global-region/" >> $installed_chrome
	echo "$locale_res/IT.jar!/locale/IT/messenger-region/" >> $installed_chrome
	echo "$locale_res/IT.jar!/locale/IT/navigator-region/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/autoconfig/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/chatzilla/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/communicator/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/content-packs/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/cookie/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/editor/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/global/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/inspector/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/messenger/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/messenger-smime/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/mozldap/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/navigator/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/necko/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/p3p/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/pipnss/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/pippki/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/venkman/" >> $installed_chrome
	echo "$locale_res/it-IT.jar!/locale/it-IT/wallet/" >> $installed_chrome
}

function remove_langitit {
	grep -v '/it-IT/' $installed_chrome | grep -v 'IT.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langjajp {
	echo "$locale_res/JP.jar!/locale/JP/communicator-region/" >> $installed_chrome
	echo "$locale_res/JP.jar!/locale/JP/editor-region/" >> $installed_chrome
	echo "$locale_res/JP.jar!/locale/JP/global-region/" >> $installed_chrome
	echo "$locale_res/JP.jar!/locale/JP/messenger-region/" >> $installed_chrome
	echo "$locale_res/JP.jar!/locale/JP/navigator-region/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/autoconfig/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/chatzilla/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/communicator/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/content-packs/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/cookie/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/editor/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/global/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/help/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/inspector/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/messenger/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/messenger-smime/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/mozldap/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/navigator/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/necko/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/p3p/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/pipnss/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/pippki/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/venkman/" >> $installed_chrome
	echo "$locale_res/ja-JP.jar!/locale/ja-JP/wallet/" >> $installed_chrome
	echo "$locale_res/ja-unix.jar!/locale/ja-JP/communicator-platform/" >> $installed_chrome
	echo "$locale_res/ja-unix.jar!/locale/ja-JP/global-platform/" >> $installed_chrome
	echo "$locale_res/ja-unix.jar!/locale/ja-JP/navigator-platform/" >> $installed_chrome
}

function remove_langjajp {
	grep -v '/ja-JP/' $installed_chrome | grep -v 'JP.jar' | grep -v 'ja-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langplpl {
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/autoconfig/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/chatzilla/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/communicator/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/content-packs/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/cookie/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/editor/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/global/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/help/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/inspector/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/messenger/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/messenger-smime/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/mozldap/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/navigator/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/necko/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/p3p/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/pipnss/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/pippki/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/venkman/" >> $installed_chrome
	echo "$locale_res/pl-PL.jar!/locale/pl-PL/wallet/" >> $installed_chrome
	echo "$locale_res/pl-unix.jar!/locale/pl-PL/communicator-platform/" >> $installed_chrome
	echo "$locale_res/pl-unix.jar!/locale/pl-PL/global-platform/" >> $installed_chrome
	echo "$locale_res/pl-unix.jar!/locale/pl-PL/navigator-platform/" >> $installed_chrome
}

function remove_langplpl {
	grep -v '/pl-PL/' $installed_chrome | grep -v 'pl-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langukua {
	echo "$locale_res/UA.jar!/locale/UA/communicator-region/" >> $installed_chrome
	echo "$locale_res/UA.jar!/locale/UA/editor-region/" >> $installed_chrome
	echo "$locale_res/UA.jar!/locale/UA/global-region/" >> $installed_chrome
	echo "$locale_res/UA.jar!/locale/UA/messenger-region/" >> $installed_chrome
	echo "$locale_res/UA.jar!/locale/UA/navigator-region/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/autoconfig/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/communicator/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/content-packs/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/cookie/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/editor/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/global/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/help/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/messenger/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/messenger-smime/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/mozldap/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/navigator/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/necko/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/p3p/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/pipnss/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/pippki/" >> $installed_chrome
	echo "$locale_res/uk-UA.jar!/locale/uk-UA/wallet/" >> $installed_chrome
}

function remove_langukua {
	grep -v '/uk-UA/' $installed_chrome | grep -v 'UA.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langzhcn {
	echo "$locale_res/CN.jar!/locale/CN/communicator-region/" >> $installed_chrome
	echo "$locale_res/CN.jar!/locale/CN/editor-region/" >> $installed_chrome
	echo "$locale_res/CN.jar!/locale/CN/global-region/" >> $installed_chrome
	echo "$locale_res/CN.jar!/locale/CN/messenger-region/" >> $installed_chrome
	echo "$locale_res/CN.jar!/locale/CN/navigator-region/" >> $installed_chrome
	echo "$locale_res/zh-CN-optional.jar!/locale/zh-CN/chatzilla/" >> $installed_chrome
	echo "$locale_res/zh-CN-optional.jar!/locale/zh-CN/inspector/" >> $installed_chrome
	echo "$locale_res/zh-CN-optional.jar!/locale/zh-CN/venkman/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/autoconfig/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/communicator/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/content-packs/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/cookie/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/editor/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/global/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/help/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/messenger/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/messenger-smime/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/mozldap/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/navigator/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/necko/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/p3p/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/pipnss/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/pippki/" >> $installed_chrome
	echo "$locale_res/zh-CN.jar!/locale/zh-CN/wallet/" >> $installed_chrome
	echo "$locale_res/zh-CN_unix.jar!/locale/zh-CN/communicator-platform/" >> $installed_chrome
	echo "$locale_res/zh-CN_unix.jar!/locale/zh-CN/global-platform/" >> $installed_chrome
	echo "$locale_res/zh-CN_unix.jar!/locale/zh-CN/navigator-platform/" >> $installed_chrome
}

function remove_langzhcn {
	grep -v '/zh-CN/' $installed_chrome | grep -v 'zh-CN-optional.jar' | grep -v 'zh-CN_unix.jar' | grep -v 'CN.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langzhtw {
	echo "$locale_res/TW.jar!/locale/TW/communicator-region/" >> $installed_chrome
	echo "$locale_res/TW.jar!/locale/TW/editor-region/" >> $installed_chrome
	echo "$locale_res/TW.jar!/locale/TW/global-region/" >> $installed_chrome
	echo "$locale_res/TW.jar!/locale/TW/messenger-region/" >> $installed_chrome
	echo "$locale_res/TW.jar!/locale/TW/navigator-region/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/autoconfig/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/communicator/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/content-packs/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/cookie/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/editor/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/global/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/help/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/messenger/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/messenger-smime/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/mozldap/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/navigator/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/necko/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/p3p/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/pipnss/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/pippki/" >> $installed_chrome
	echo "$locale_res/zh-TW.jar!/locale/zh-TW/wallet/" >> $installed_chrome
	echo "$locale_res/zh-optional.jar!/locale/zh-TW/chatzilla/" >> $installed_chrome
	echo "$locale_res/zh-optional.jar!/locale/zh-TW/inspector/" >> $installed_chrome
	echo "$locale_res/zh-optional.jar!/locale/zh-TW/venkman/" >> $installed_chrome
	echo "$locale_res/zh-unix.jar!/locale/zh-TW/communicator-platform/" >> $installed_chrome
	echo "$locale_res/zh-unix.jar!/locale/zh-TW/global-platform/" >> $installed_chrome
	echo "$locale_res/zh-unix.jar!/locale/zh-TW/navigator-platform/" >> $installed_chrome
}

function remove_langzhtw {
	grep -v '/zh-TW/' $installed_chrome | grep -v 'zh-optional.jar' | grep -v 'zh-unix.jar' | grep -v 'TW.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langengb {
	echo "$locale_res/en-GB-unix.jar!/locale/en-GB/communicator-platform/" >> $installed_chrome
	echo "$locale_res/en-GB-unix.jar!/locale/en-GB/global-platform/" >> $installed_chrome
	echo "$locale_res/en-GB-unix.jar!/locale/en-GB/navigator-platform/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/autoconfig/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/communicator/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/content-packs/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/cookie/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/editor/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/global/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/help/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/messenger/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/messenger-smime/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/mozldap/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/navigator/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/necko/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/p3p/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/pipnss/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/pippki/" >> $installed_chrome
	echo "$locale_res/en-GB.jar!/locale/en-GB/wallet/" >> $installed_chrome
}

function remove_langengb {
	grep -v '/en-GB/' $installed_chrome > $tmp
	mv $tmp $installed_chrome
}

function install_langelgr {
	echo "$locale_res/el-gr.jar!/locale/el-gr/autoconfig/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/communicator/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/content-packs/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/cookie/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/editor/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/global/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/help/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/messenger/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/messenger-smime/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/mozldap/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/navigator/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/necko/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/p3p/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/pipnss/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/pippki/" >> $installed_chrome
	echo "$locale_res/el-gr.jar!/locale/el-gr/wallet/" >> $installed_chrome
	echo "$locale_res/el-unix.jar!/locale/el-gr/communicator-platform/" >> $installed_chrome
	echo "$locale_res/el-unix.jar!/locale/el-gr/global-platform/" >> $installed_chrome
	echo "$locale_res/el-unix.jar!/locale/el-gr/navigator-platform/" >> $installed_chrome
}

function remove_langelgr {
	grep -v '/el-gr/' $installed_chrome | grep -v 'el-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langheil {
	echo "$locale_res/IL.jar!/locale/IL/communicator-region/" >> $installed_chrome
	echo "$locale_res/IL.jar!/locale/IL/editor-region/" >> $installed_chrome
	echo "$locale_res/IL.jar!/locale/IL/global-region/" >> $installed_chrome
	echo "$locale_res/IL.jar!/locale/IL/messenger-region/" >> $installed_chrome
	echo "$locale_res/IL.jar!/locale/IL/navigator-region/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/autoconfig/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/communicator/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/content-packs/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/cookie/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/editor/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/global/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/help/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/messenger/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/messenger-smime/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/mozldap/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/navigator/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/necko/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/p3p/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/pipnss/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/pippki/" >> $installed_chrome
	echo "$locale_res/he-IL.jar!/locale/he-IL/wallet/" >> $installed_chrome
	echo "$locale_res/he-unix.jar!/locale/he-IL/communicator-platform/" >> $installed_chrome
	echo "$locale_res/he-unix.jar!/locale/he-IL/global-platform/" >> $installed_chrome
	echo "$locale_res/he-unix.jar!/locale/he-IL/navigator-platform/" >> $installed_chrome
}

function remove_langheil {
	grep -v '/he-IL/' $installed_chrome | grep -v 'IL.jar' | grep -v 'he-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langkokr {
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/autoconfig/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/chatzilla/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/communicator/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/content-packs/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/cookie/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/editor/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/global/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/help/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/inspector/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/messenger/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/messenger-smime/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/mozldap/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/navigator/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/necko/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/p3p/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/pipnss/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/pippki/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/venkman/" >> $installed_chrome
	echo "$locale_res/ko-KR.jar!/locale/ko-KR/wallet/" >> $installed_chrome
}

function remove_langkokr {
	grep -v '/ko-KR/' $installed_chrome | grep -v 'KR.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langmsmy {
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/communicator/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/content-packs/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/cookie/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/editor/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/forms/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/global/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/help/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/messenger/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/messenger-smime/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/mozldap/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/navigator/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/necko/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/pipnss/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/pippki/" >> $installed_chrome
	echo "$locale_res/ms-MY.jar!/locale/ms-MY/wallet/" >> $installed_chrome
	echo "$locale_res/ms-unix.jar!/locale/ms-MY/navigator-platform/" >> $installed_chrome
	echo "$locale_res/ms-unix.jar!/locale/ms-MY/global-platform/" >> $installed_chrome
	echo "$locale_res/ms-unix.jar!/locale/ms-MY/communicator-platform/" >> $installed_chrome
}

function remove_langmsmy {
	grep -v '/ms-MY/' $installed_chrome | grep -v 'ms-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langarsa {
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/autoconfig/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/communicator/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/content-packs/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/cookie/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/editor/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/global/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/help/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/messenger/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/messenger-smime/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/mozldap/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/navigator/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/necko/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/p3p/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/pipnss/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/pippki/" >> $installed_chrome
	echo "$locale_res/ar-SA.jar!/locale/ar-SA/wallet/" >> $installed_chrome
	echo "$locale_res/ar-unix.jar!/locale/ar-SA/communicator-platform/" >> $installed_chrome
	echo "$locale_res/ar-unix.jar!/locale/ar-SA/global-platform/" >> $installed_chrome
	echo "$locale_res/ar-unix.jar!/locale/ar-SA/navigator-platform/" >> $installed_chrome
}

function remove_langarsa {
	grep -v '/ar-SA/' $installed_chrome | grep -v 'ar-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langastes {
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/autoconfig/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/communicator/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/content-packs/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/cookie/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/editor/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/global/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/help/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/messenger/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/messenger-smime/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/mozldap/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/navigator/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/necko/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/p3p/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/pipnss/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/pippki/" >> $installed_chrome
	echo "$locale_res/ast-ES.jar!/locale/ast-ES/wallet/" >> $installed_chrome
	echo "$locale_res/ast-unix.jar!/locale/ast-ES/communicator-platform/" >> $installed_chrome
	echo "$locale_res/ast-unix.jar!/locale/ast-ES/global-platform/" >> $installed_chrome
	echo "$locale_res/ast-unix.jar!/locale/ast-ES/navigator-platform/" >> $installed_chrome
}

function remove_langastes {
	grep -v '/ast-ES/' $installed_chrome | grep -v 'ast-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langbeby {
	echo "$locale_res/BY.jar!/locale/BY/communicator-region/" >> $installed_chrome
	echo "$locale_res/BY.jar!/locale/BY/editor-region/" >> $installed_chrome
	echo "$locale_res/BY.jar!/locale/BY/global-region/" >> $installed_chrome
	echo "$locale_res/BY.jar!/locale/BY/messenger-region/" >> $installed_chrome
	echo "$locale_res/BY.jar!/locale/BY/navigator-region/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/autoconfig/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/communicator/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/content-packs/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/cookie/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/editor/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/global/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/help/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/messenger/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/messenger-smime/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/mozldap/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/navigator/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/necko/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/p3p/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/pipnss/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/pippki/" >> $installed_chrome
	echo "$locale_res/be-BY.jar!/locale/be-BY/wallet/" >> $installed_chrome
	echo "$locale_res/be-unix.jar!/locale/be-BY/communicator-platform/" >> $installed_chrome
	echo "$locale_res/be-unix.jar!/locale/be-BY/global-platform/" >> $installed_chrome
	echo "$locale_res/be-unix.jar!/locale/be-BY/navigator-platform/" >> $installed_chrome
}

function remove_langbeby {
	grep -v '/be-BY/' $installed_chrome | grep -v 'BY.jar' | grep -v 'be-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langbgbg {
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/autoconfig/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/chatzilla/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/communicator/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/content-packs/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/cookie/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/editor/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/global/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/help/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/inspector/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/messenger/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/messenger-smime/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/mozldap/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/navigator/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/necko/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/p3p/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/pipnss/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/pippki/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/venkman/" >> $installed_chrome
	echo "$locale_res/bg-BG.jar!/locale/bg-BG/wallet/" >> $installed_chrome
	echo "$locale_res/bg-unix.jar!/locale/bg-BG/communicator-platform/" >> $installed_chrome
	echo "$locale_res/bg-unix.jar!/locale/bg-BG/global-platform/" >> $installed_chrome
	echo "$locale_res/bg-unix.jar!/locale/bg-BG/navigator-platform/" >> $installed_chrome
}

function remove_langbgbg {
	grep -v '/bg-BG/' $installed_chrome | grep -v 'bg-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langbrfr {
	echo "$locale_res/br-FR.jar!/locale/br-FR/autoconfig/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/communicator/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/content-packs/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/cookie/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/editor/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/global/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/help/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/messenger/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/messenger-smime/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/mozldap/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/navigator/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/necko/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/p3p/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/pipnss/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/pippki/" >> $installed_chrome
	echo "$locale_res/br-FR.jar!/locale/br-FR/wallet/" >> $installed_chrome
	echo "$locale_res/br-unix.jar!/locale/br-FR/communicator-platform/" >> $installed_chrome
	echo "$locale_res/br-unix.jar!/locale/br-FR/global-platform/" >> $installed_chrome
	echo "$locale_res/br-unix.jar!/locale/br-FR/navigator-platform/" >> $installed_chrome
}

function remove_langbrfr {
	grep -v '/br-FR/' $installed_chrome | grep -v 'br-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langcaes {
	echo "$locale_res/ca-unix.jar!/locale/ca/communicator-platform/" >> $installed_chrome
	echo "$locale_res/ca-unix.jar!/locale/ca/global-platform/" >> $installed_chrome
	echo "$locale_res/ca-unix.jar!/locale/ca/navigator-platform/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/autoconfig/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/chatzilla/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/communicator/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/content-packs/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/cookie/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/editor/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/forms/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/global/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/help/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/messenger/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/messenger-smime/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/mozldap/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/navigator/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/necko/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/p3p/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/pipnss/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/pippki/" >> $installed_chrome
	echo "$locale_res/ca.jar!/locale/ca/wallet/" >> $installed_chrome
}

function remove_langcaes {
	grep -v '/ca.jar/' $installed_chrome | grep -v 'ca-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langcscz {
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/autoconfig/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/communicator/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/content-packs/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/cookie/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/editor/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/global/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/help/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/messenger/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/messenger-smime/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/mozldap/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/navigator/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/necko/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/p3p/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/pipnss/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/pippki/" >> $installed_chrome
	echo "$locale_res/cs-CZ.jar!/locale/cs-CZ/wallet/" >> $installed_chrome
	echo "$locale_res/cs-unix.jar!/locale/cs-CZ/communicator-platform/" >> $installed_chrome
	echo "$locale_res/cs-unix.jar!/locale/cs-CZ/global-platform/" >> $installed_chrome
	echo "$locale_res/cs-unix.jar!/locale/cs-CZ/navigator-platform/" >> $installed_chrome
}

function remove_langcscz {
	grep -v '/cs-CZ/' $installed_chrome | grep -v 'cs-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langcygb {
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/autoconfig/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/communicator/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/content-packs/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/cookie/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/editor/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/global/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/help/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/messenger/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/messenger-smime/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/mozldap/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/navigator/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/necko/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/p3p/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/pipnss/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/pippki/" >> $installed_chrome
	echo "$locale_res/cy-GB.jar!/locale/cy-GB/wallet/" >> $installed_chrome
	echo "$locale_res/cy-unix.jar!/locale/cy-GB/communicator-platform/" >> $installed_chrome
	echo "$locale_res/cy-unix.jar!/locale/cy-GB/global-platform/" >> $installed_chrome
	echo "$locale_res/cy-unix.jar!/locale/cy-GB/navigator-platform/" >> $installed_chrome
}

function remove_langcygb {
	grep -v '/cy-GB/' $installed_chrome | grep -v 'cy-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langeoeo {
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/autoconfig/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/communicator/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/content-packs/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/cookie/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/editor/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/global/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/help/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/messenger/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/messenger-smime/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/mozldap/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/navigator/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/necko/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/p3p/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/pipnss/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/pippki/" >> $installed_chrome
	echo "$locale_res/eo-EO.jar!/locale/eo-EO/wallet/" >> $installed_chrome
	echo "$locale_res/eo-unix.jar!/locale/eo-EO/communicator-platform/" >> $installed_chrome
	echo "$locale_res/eo-unix.jar!/locale/eo-EO/global-platform/" >> $installed_chrome
	echo "$locale_res/eo-unix.jar!/locale/eo-EO/navigator-platform/" >> $installed_chrome
}

function remove_langeoeo {
	grep -v '/eo-EO/' $installed_chrome | grep -v 'eo-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langeses {
	echo "$locale_res/es-ES.jar!/locale/es-ES/autoconfig/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/communicator/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/content-packs/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/cookie/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/editor/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/global/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/help/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/messenger/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/messenger-smime/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/mozldap/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/navigator/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/necko/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/p3p/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/pipnss/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/pippki/" >> $installed_chrome
	echo "$locale_res/es-ES.jar!/locale/es-ES/wallet/" >> $installed_chrome
	echo "$locale_res/es-unix.jar!/locale/es-ES/communicator-platform/" >> $installed_chrome
	echo "$locale_res/es-unix.jar!/locale/es-ES/global-platform/" >> $installed_chrome
	echo "$locale_res/es-unix.jar!/locale/es-ES/navigator-platform/" >> $installed_chrome
}

function remove_langeses {
	grep -v '/es-ES/' $installed_chrome | grep -v 'es-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langeues {
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/autoconfig/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/communicator/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/content-packs/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/cookie/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/editor/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/global/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/help/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/messenger/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/messenger-smime/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/mozldap/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/navigator/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/necko/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/p3p/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/pipnss/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/pippki/" >> $installed_chrome
	echo "$locale_res/eu-ES.jar!/locale/eu-ES/wallet/" >> $installed_chrome
	echo "$locale_res/eu-unix.jar!/locale/eu-ES/communicator-platform/" >> $installed_chrome
	echo "$locale_res/eu-unix.jar!/locale/eu-ES/global-platform/" >> $installed_chrome
	echo "$locale_res/eu-unix.jar!/locale/eu-ES/navigator-platform/" >> $installed_chrome
}

function remove_langeues {
	grep -v '/eu-ES/' $installed_chrome | grep -v 'eu-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langfifi {
	echo "$locale_res/FI.jar!/locale/FI/communicator-region/" >> $installed_chrome
	echo "$locale_res/FI.jar!/locale/FI/editor-region/" >> $installed_chrome
	echo "$locale_res/FI.jar!/locale/FI/global-region/" >> $installed_chrome
	echo "$locale_res/FI.jar!/locale/FI/messenger-region/" >> $installed_chrome
	echo "$locale_res/FI.jar!/locale/FI/navigator-region/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/autoconfig/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/communicator/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/content-packs/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/cookie/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/editor/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/global/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/help/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/messenger/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/messenger-smime/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/mozldap/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/navigator/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/necko/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/p3p/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/pipnss/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/pippki/" >> $installed_chrome
	echo "$locale_res/fi-FI.jar!/locale/fi-FI/wallet/" >> $installed_chrome
	echo "$locale_res/fi-unix.jar!/locale/fi-FI/communicator-platform/" >> $installed_chrome
	echo "$locale_res/fi-unix.jar!/locale/fi-FI/global-platform/" >> $installed_chrome
	echo "$locale_res/fi-unix.jar!/locale/fi-FI/navigator-platform/" >> $installed_chrome
}

function remove_langfifi {
	grep -v '/fi-FI/' $installed_chrome | grep -v 'FI.jar' | grep -v 'fi-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langgles {
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/autoconfig/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/communicator/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/content-packs/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/cookie/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/editor/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/global/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/help/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/messenger/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/messenger-smime/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/mozldap/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/navigator/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/necko/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/p3p/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/pipnss/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/pippki/" >> $installed_chrome
	echo "$locale_res/gl-ES.jar!/locale/gl-ES/wallet/" >> $installed_chrome
	echo "$locale_res/gl-unix.jar!/locale/gl-ES/communicator-platform/" >> $installed_chrome
	echo "$locale_res/gl-unix.jar!/locale/gl-ES/global-platform/" >> $installed_chrome
	echo "$locale_res/gl-unix.jar!/locale/gl-ES/navigator-platform/" >> $installed_chrome
}

function remove_langgles {
	grep -v '/gl-ES/' $installed_chrome | grep -v 'gl-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langhuhu {
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/autoconfig/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/chatzilla/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/communicator/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/content-packs/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/cookie/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/editor/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/global/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/help/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/inspector/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/messenger/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/messenger-smime/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/mozldap/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/navigator/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/necko/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/p3p/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/pipnss/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/pippki/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/venkman/" >> $installed_chrome
	echo "$locale_res/hu-HU.jar!/locale/hu-HU/wallet/" >> $installed_chrome
	echo "$locale_res/hu-unix.jar!/locale/hu-HU/communicator-platform/" >> $installed_chrome
	echo "$locale_res/hu-unix.jar!/locale/hu-HU/global-platform/" >> $installed_chrome
	echo "$locale_res/hu-unix.jar!/locale/hu-HU/navigator-platform/" >> $installed_chrome
}

function remove_langhuhu {
	grep -v '/hu-HU/' $installed_chrome | grep -v 'hu-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langnbno {
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/autoconfig/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/chatzilla/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/communicator/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/content-packs/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/cookie/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/editor/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/global/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/help/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/messenger/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/messenger-smime/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/mozldap/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/navigator/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/necko/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/p3p/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/pipnss/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/pippki/" >> $installed_chrome
	echo "$locale_res/nb-NO.jar!/locale/nb-NO/wallet/" >> $installed_chrome
	echo "$locale_res/nb-unix.jar!/locale/nb-NO/communicator-platform/" >> $installed_chrome
	echo "$locale_res/nb-unix.jar!/locale/nb-NO/global-platform/" >> $installed_chrome
	echo "$locale_res/nb-unix.jar!/locale/nb-NO/navigator-platform/" >> $installed_chrome
}

function remove_langnbno {
	grep -v '/nb-NO/' $installed_chrome | grep -v 'nb-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langnlnl {
	echo "$locale_res/NL.jar!/locale/NL/communicator-region/" >> $installed_chrome
	echo "$locale_res/NL.jar!/locale/NL/editor-region/" >> $installed_chrome
	echo "$locale_res/NL.jar!/locale/NL/global-region/" >> $installed_chrome
	echo "$locale_res/NL.jar!/locale/NL/messenger-region/" >> $installed_chrome
	echo "$locale_res/NL.jar!/locale/NL/navigator-region/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/autoconfig/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/communicator/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/content-packs/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/cookie/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/editor/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/global/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/help/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/messenger/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/messenger-smime/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/mozldap/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/navigator/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/necko/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/p3p/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/pipnss/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/pippki/" >> $installed_chrome
	echo "$locale_res/nl-NL.jar!/locale/nl-NL/wallet/" >> $installed_chrome
	echo "$locale_res/nl-unix.jar!/locale/nl-NL/communicator-platform/" >> $installed_chrome
	echo "$locale_res/nl-unix.jar!/locale/nl-NL/global-platform/" >> $installed_chrome
	echo "$locale_res/nl-unix.jar!/locale/nl-NL/navigator-platform/" >> $installed_chrome
}

function remove_langnlnl {
	grep -v '/nl-NL/' $installed_chrome | grep -v 'NL.jar' | grep -v 'nl-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langnnno {
	echo "$locale_res/NO.jar!/locale/NO/communicator-region/" >> $installed_chrome
	echo "$locale_res/NO.jar!/locale/NO/editor-region/" >> $installed_chrome
	echo "$locale_res/NO.jar!/locale/NO/global-region/" >> $installed_chrome
	echo "$locale_res/NO.jar!/locale/NO/messenger-region/" >> $installed_chrome
	echo "$locale_res/NO.jar!/locale/NO/navigator-region/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/autoconfig/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/calendar/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/chatzilla/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/communicator/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/content-packs/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/cookie/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/editor/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/global/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/googlebar/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/help/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/inspector/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/messenger/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/messenger-smime/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/mozldap/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/navigator/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/necko/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/p3p/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/pipnss/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/pippki/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/preferential/" >> $installed_chrome
	echo "$locale_res/nn-NO.jar!/locale/nn-NO/wallet/" >> $installed_chrome
	echo "$locale_res/nn-unix.jar!/locale/nn-NO/communicator-platform/" >> $installed_chrome
	echo "$locale_res/nn-unix.jar!/locale/nn-NO/global-platform/" >> $installed_chrome
	echo "$locale_res/nn-unix.jar!/locale/nn-NO/navigator-platform/" >> $installed_chrome
}

function remove_langnnno {
	grep -v '/nn-NO/' $installed_chrome | grep -v 'nn-unix.jar' | grep -v 'NO.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langroro {
	echo "$locale_res/RO.jar!/locale/RO/communicator-region/" >> $installed_chrome
	echo "$locale_res/RO.jar!/locale/RO/editor-region/" >> $installed_chrome
	echo "$locale_res/RO.jar!/locale/RO/global-region/" >> $installed_chrome
	echo "$locale_res/RO.jar!/locale/RO/messenger-region/" >> $installed_chrome
	echo "$locale_res/RO.jar!/locale/RO/navigator-region/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/autoconfig/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/chatzilla/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/communicator/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/content-packs/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/cookie/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/editor/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/global/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/help/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/messenger/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/messenger-smime/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/mozldap/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/navigator/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/necko/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/p3p/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/pipnss/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/pippki/" >> $installed_chrome
	echo "$locale_res/ro-RO.jar!/locale/ro-RO/wallet/" >> $installed_chrome
	echo "$locale_res/ro-unix.jar!/locale/ro-RO/communicator-platform/" >> $installed_chrome
	echo "$locale_res/ro-unix.jar!/locale/ro-RO/global-platform/" >> $installed_chrome
	echo "$locale_res/ro-unix.jar!/locale/ro-RO/navigator-platform/" >> $installed_chrome
}

function remove_langroro {
	grep -v '/ro-RO/' $installed_chrome | grep -v 'ro-unix.jar' | grep -v 'RO.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langsksk {
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/autoconfig/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/communicator/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/content-packs/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/cookie/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/editor/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/global/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/help/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/messenger/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/messenger-smime/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/mozldap/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/navigator/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/necko/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/p3p/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/pipnss/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/pippki/" >> $installed_chrome
	echo "$locale_res/sk-SK.jar!/locale/sk-SK/wallet/" >> $installed_chrome
	echo "$locale_res/sk-unix.jar!/locale/sk-SK/communicator-platform/" >> $installed_chrome
	echo "$locale_res/sk-unix.jar!/locale/sk-SK/global-platform/" >> $installed_chrome
	echo "$locale_res/sk-unix.jar!/locale/sk-SK/navigator-platform/" >> $installed_chrome
}

function remove_langsksk {
	grep -v '/sk-SK/' $installed_chrome | grep -v 'sk-unix.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langslsi {
	echo "$locale_res/SI.jar!/locale/SI/communicator-region/" >> $installed_chrome
	echo "$locale_res/SI.jar!/locale/SI/editor-region/" >> $installed_chrome
	echo "$locale_res/SI.jar!/locale/SI/global-region/" >> $installed_chrome
	echo "$locale_res/SI.jar!/locale/SI/messenger-region/" >> $installed_chrome
	echo "$locale_res/SI.jar!/locale/SI/navigator-region/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/autoconfig/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/communicator/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/content-packs/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/cookie/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/editor/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/global/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/help/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/messenger/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/messenger-smime/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/mozldap/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/navigator/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/necko/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/p3p/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/pipnss/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/pippki/" >> $installed_chrome
	echo "$locale_res/sl-SI.jar!/locale/sl-SI/wallet/" >> $installed_chrome
	echo "$locale_res/sl-unix.jar!/locale/sl-SI/communicator-platform/" >> $installed_chrome
	echo "$locale_res/sl-unix.jar!/locale/sl-SI/global-platform/" >> $installed_chrome
	echo "$locale_res/sl-unix.jar!/locale/sl-SI/navigator-platform/" >> $installed_chrome
}

function remove_langslsi {
	grep -v '/sl-SI/' $installed_chrome | grep -v 'sl-unix.jar' | grep -v 'SI.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langtamy {
	echo "$locale_res/MY.jar!/locale/MY/communicator-region/" >> $installed_chrome
	echo "$locale_res/MY.jar!/locale/MY/editor-region/" >> $installed_chrome
	echo "$locale_res/MY.jar!/locale/MY/global-region/" >> $installed_chrome
	echo "$locale_res/MY.jar!/locale/MY/messenger-region/" >> $installed_chrome
	echo "$locale_res/MY.jar!/locale/MY/navigator-region/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/autoconfig/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/communicator/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/content-packs/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/cookie/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/editor/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/global/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/help/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/messenger/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/messenger-smime/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/mozldap/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/navigator/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/necko/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/p3p/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/pipnss/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/pippki/" >> $installed_chrome
	echo "$locale_res/ta-MY.jar!/locale/ta-MY/wallet/" >> $installed_chrome
	echo "$locale_res/ta-unix.jar!/locale/ta-MY/communicator-platform/" >> $installed_chrome
	echo "$locale_res/ta-unix.jar!/locale/ta-MY/global-platform/" >> $installed_chrome
	echo "$locale_res/ta-unix.jar!/locale/ta-MY/navigator-platform/" >> $installed_chrome
}

function remove_langtamy {
	grep -v '/ta-MY/' $installed_chrome | grep -v 'ta-unix.jar' | grep -v 'MY.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langtrtr {
	echo "$locale_res/TR.jar!/locale/TR/communicator-region/" >> $installed_chrome
	echo "$locale_res/TR.jar!/locale/TR/editor-region/" >> $installed_chrome
	echo "$locale_res/TR.jar!/locale/TR/global-region/" >> $installed_chrome
	echo "$locale_res/TR.jar!/locale/TR/messenger-region/" >> $installed_chrome
	echo "$locale_res/TR.jar!/locale/TR/navigator-region/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/autoconfig/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/calendar/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/chatzilla/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/communicator/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/content-packs/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/cookie/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/editor/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/global/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/help/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/inspector/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/messenger/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/messenger-smime/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/mozldap/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/navigator/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/necko/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/p3p/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/pipnss/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/pippki/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/venkman/" >> $installed_chrome
	echo "$locale_res/tr-TR.jar!/locale/tr-TR/wallet/" >> $installed_chrome
	echo "$locale_res/tr-unix.jar!/locale/tr-TR/communicator-platform/" >> $installed_chrome
	echo "$locale_res/tr-unix.jar!/locale/tr-TR/global-platform/" >> $installed_chrome
	echo "$locale_res/tr-unix.jar!/locale/tr-TR/navigator-platform/" >> $installed_chrome
}

function remove_langtrtr {
	grep -v '/tr-TR/' $installed_chrome | grep -v 'tr-unix.jar' | grep -v 'TR.jar' > $tmp
	mv $tmp $installed_chrome
}

function install_langwende {
	echo "$locale_res/DE.jar!/locale/DE/communicator-region/" >> $installed_chrome
	echo "$locale_res/DE.jar!/locale/DE/editor-region/" >> $installed_chrome
	echo "$locale_res/DE.jar!/locale/DE/global-region/" >> $installed_chrome
	echo "$locale_res/DE.jar!/locale/DE/messenger-region/" >> $installed_chrome
	echo "$locale_res/DE.jar!/locale/DE/navigator-region/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/autoconfig/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/chatzilla/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/communicator/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/content-packs/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/cookie/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/editor/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/global/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/help/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/inspector/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/messenger/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/messenger-mdn/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/messenger-smime/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/mozldap/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/navigator/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/necko/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/p3p/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/pipnss/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/pippki/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/venkman/" >> $installed_chrome
	echo "$locale_res/wen-DE.jar!/locale/wen-DE/wallet/" >> $installed_chrome
	echo "$locale_res/wen-unix.jar!/locale/wen-DE/communicator-platform/" >> $installed_chrome
	echo "$locale_res/wen-unix.jar!/locale/wen-DE/global-platform/" >> $installed_chrome
	echo "$locale_res/wen-unix.jar!/locale/wen-DE/navigator-platform/" >> $installed_chrome
}

function remove_langwende {
	grep -v 'wen-DE/' $installed_chrome | grep -v 'wen-unix.jar' | grep -v 'DE.jar' > $tmp
	mv $tmp $installed_chrome
}

function create_rdf {
    # remove all-locales.rdf file (see bug 55267 for explanation)
    rm -f $moz_home/chrome/chrome.rdf
    export LD_LIBRARYN32_PATH=$moz_libs:$LD_LIBRARYN32_PATH
    export MOZILLA_FIVE_HOME=$moz_home
    $moz_home/regchrome
}

function usuage {
	echo "Usage: $0 [-r] (langfrfr.xpi|langdadk.xpi|langdeat.xpi|langengb.xpi|langelgr.xpi|langetee.xpi|langitit.xpi|langjajp.xpi|langplpl.xpi|langukua.xpi|langzhcn.xpi|langzhtw.xpi|langheil.xpi|langkokr.xpi|langmsmy.xpi|langarsa.xpi|langastes.xpi|langbeby.xpi|langbgbg.xpi|langbrfr.xpi|langcaes.xpi|langcscz.xpi|langcygb.xpi|langeoeo.xpi|langeses.xpi|langeues.xpi|langfifi.xpi|langgles.xpi|langhuhu.xpi|langnbno.xpi|langnlnl.xpi|langnnno.xpi|langroro.xpi|langsksk.xpi|langslsi.xpi|langtamy.xpi|langtrtr.xpi|langwende.xpi)"
	exit 1
}

if [ $# -ne 1 -a $# -ne 2 ]; then
	usuage
fi

if [ $# -eq 2 ]; then
	if [ "$1" = "-r" ]; then
		remove=1;
	else
		usuage
	fi
	package=$2
else
	remove=0
	package=$1
fi

case "$package" in 
	langfrfr*)
		if [ $remove -eq 1 ]; then
		    remove_langfrfr
		else
		    install_langfrfr
		fi
		;;
	langdadk*)
		if [ $remove -eq 1 ]; then
		    remove_langdadk
		else
		    install_langdadk
		fi
		;;
	langdeat*)
		if [ $remove -eq 1 ]; then
		    remove_langdeat
		else
		    install_langdeat
		fi
		;;
	langengb*)
		if [ $remove -eq 1 ]; then
		    remove_langengb
		else
		    install_langengb
		fi
		;;
	langelgr*)
		if [ $remove -eq 1 ]; then
		    remove_langelgr
		else
		    install_langelgr
		fi
		;;
	langetee*)
		if [ $remove -eq 1 ]; then
		    remove_langetee
		else
		    install_langetee
	    	fi
		;;
	langitit*)
		if [ $remove -eq 1 ]; then
		    remove_langitit
		else
		    install_langitit
		fi
		;;
	langjajp*)
		if [ $remove -eq 1 ]; then
		    remove_langjajp
		else
		    install_langjajp
		fi
		;;
	langplpl*)
		if [ $remove -eq 1 ]; then
		    remove_langplpl
		else
		    install_langplpl
		fi    
		;;
	langukua*)
		if [ $remove -eq 1 ]; then
		    remove_langukua
		else
		    install_langukua
		fi
		;;
	langzhcn*)
		if [ $remove -eq 1 ]; then
		    remove_langzhcn
		else
		    install_langzhcn
		fi
		;;
	langzhtw*)
		if [ $remove -eq 1 ]; then
		    remove_langzhtw
		else
		    install_langzhtw
		fi
		;;
	langheil*)
		if [ $remove -eq 1 ]; then
		    remove_langheil
		else
		    install_langheil
		fi
		;;
	langkokr*)
		if [ $remove -eq 1 ]; then
		    remove_langkokr
		else
		    install_langkokr
		fi
		;;
	langmsmy*)
		if [ $remove -eq 1 ]; then
		    remove_langmsmy
		else
		    install_langmsmy
		fi
		;;
	langarsa*)
		if [ $remove -eq 1 ]; then
		    remove_langarsa
		else
		    install_langarsa
		fi
		;;
	langastes*)
		if [ $remove -eq 1 ]; then
		    remove_langastes
		else
		    install_langastes
		fi
		;;
	langbeby*)
		if [ $remove -eq 1 ]; then
		    remove_langbeby
		else
		    install_langbeby
		fi
		;;
	langbgbg*)
		if [ $remove -eq 1 ]; then
		    remove_langbgbg
		else
		    install_langbgbg
		fi
		;;
	langbrfr*)
		if [ $remove -eq 1 ]; then
		    remove_langbrfr
		else
		    install_langbrfr
		fi
		;;
	langcaes*)
		if [ $remove -eq 1 ]; then
		    remove_langcaes
		else
		    install_langcaes
		fi
		;;
	langcscz*)
		if [ $remove -eq 1 ]; then
		    remove_langcscz
		else
		    install_langcscz
		fi
		;;
	langcygb*)
		if [ $remove -eq 1 ]; then
		    remove_langcygb
		else
		    install_langcygb
		fi
		;;
	langeoeo*)
		if [ $remove -eq 1 ]; then
		    remove_langeoeo
		else
		    install_langeoeo
		fi
		;;
	langeses*)
		if [ $remove -eq 1 ]; then
		    remove_langeses
		else
		    install_langeses
		fi
		;;
	langeues*)
		if [ $remove -eq 1 ]; then
		    remove_langeues
		else
		    install_langeues
		fi
		;;
	langfifi*)
		if [ $remove -eq 1 ]; then
		    remove_langfifi
		else
		    install_langfifi
		fi
		;;
	langgles*)
		if [ $remove -eq 1 ]; then
		    remove_langgles
		else
		    install_langgles
		fi
		;;
	langhuhu*)
		if [ $remove -eq 1 ]; then
		    remove_langhuhu
		else
		    install_langhuhu
		fi
		;;
	langnbno*)
		if [ $remove -eq 1 ]; then
		    remove_langnbno
		else
		    install_langnbno
		fi
		;;
	langnlnl*)
		if [ $remove -eq 1 ]; then
		    remove_langnlnl
		else
		    install_langnlnl
		fi
		;;
	langnnno*)
		if [ $remove -eq 1 ]; then
		    remove_langnnno
		else
		    install_langnnno
		fi
		;;
	langroro*)
		if [ $remove -eq 1 ]; then
		    remove_langroro
		else
		    install_langroro
		fi
		;;
	langsksk*)
		if [ $remove -eq 1 ]; then
		    remove_langsksk
		else
		    install_langsksk
		fi
		;;
	langslsi*)
		if [ $remove -eq 1 ]; then
		    remove_langslsi
		else
		    install_langslsi
		fi
		;;
	langtamy*)
		if [ $remove -eq 1 ]; then
		    remove_langtamy
		else
		    install_langtamy
		fi
		;;
	langtrtr*)
		if [ $remove -eq 1 ]; then
		    remove_langtrtr
		else
		    install_langtrtr
		fi
		;;
	langwende*)
		if [ $remove -eq 1 ]; then
		    remove_langwende
		else
		    install_langwende
		fi
		;;
	*)
		usuage
		;;
esac

create_rdf
